From 6dc57ee23e043502c2476538554de7c003af99c5 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 11 Sep 2014 12:00:11 -0700 Subject: [PATCH] Fix bug in list_file_walk when cwd != path Previously this was calling .is_file() on a relative path. This would fail if the path was not relative to the current working directory, for example when fingerprinting a path dependency. --- src/cargo/sources/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index f340a36f1..7f7536b67 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -80,8 +80,8 @@ impl PathSource { let root = pkg.get_manifest_path().dir_path(); Ok(candidates.move_iter().filter(|candidate| { - let candidate = candidate.path_relative_from(&root).unwrap(); - !pats.iter().any(|p| p.matches_path(&candidate)) && + let relative_path = candidate.path_relative_from(&root).unwrap(); + !pats.iter().any(|p| p.matches_path(&relative_path)) && candidate.is_file() }).collect()) } -- 2.30.2